<form method="post" class="advanced-form">
	<table>
		<tbody>
			{#param name=rowcount value=0}
			{#foreach $T.rows as row}
				{#if !$T.row.ui}
					{#continue}
				{#/if}
				{#if $T.row$index > 0 && $T.row.size == "full"}
					</tr>
				{#/if}
				{#if $P.rowcount <= 0}
					<tr>
				{#/if}
				{#if $T.row.size == "full"}
					{#param name=rowcount value=2}
				{#else}
					{#param name=rowcount value=$P.rowcount + 1}
				{#/if}
				<td style="padding: 4px;">
					{$T.row.title}:
				</td>
				<td {$T.row.size == "full" ? "colspan='3'" : ""}>
					{#if $T.row.ui == "input"}
						<input name="{$T.row.name}#{$T.row.vtype}" class="shadow {$T.row.size == 'full' ? 'max-cell' : 'single-cell'}"/>
					{#elseif $T.row.ui == "radio"}
						{#foreach $T.row.vals as val}
							<input name="{$T.row.name}#{$T.row.vtype}$feq" type="radio" value="{$T.val.value}" {$T.row.defaultVal == $T.val.value ? "checked='checked'" : ""}/>{$T.val.title}
						{#/for}
					{#elseif $T.row.ui == "select"}
						<select name="{$T.row.name}#{$T.row.vtype}$feq">
						<option value="">
						全部
					    </option>
							{#foreach $T.row.vals as val}
								<option value="{$T.val.value}" {$T.row.defaultVal == $T.val.value ? "selected='selected'" : ""}>{$T.val.title}</option>
							{#/for}
						</select>
					{#elseif $T.row.ui == "datepicker"}
						<input name="{$T.row.name}#{$T.row.vtype}" class="shadow use-def-datepicker {$T.row.size == 'full' ? 'max-cell' : 'single-cell'}"/>
					{#elseif $T.row.ui == "datepicker-range"}
						<input name="{$T.row.name}#{$T.row.vtype}" class="shadow use-def-datepicker single-cell"/>
						至
						<input name="{$T.row.name}#{$T.row.vtype}" class="shadow use-def-datepicker single-cell"/>
					{#/if}
				</td>
				{#if $P.rowcount >= 2}
					{#param name=rowcount value=0}
					</tr>
				{#/if}
			{#/for}
		</tbody>
	</table>
	<button class="startAdvSearch float-box-submit special advanced-submit">搜索</button>
	<button class="float-box-submit special advanced-close">关闭</button>
</form>
